package com.can.domain.po;

import lombok.Data;
import lombok.NoArgsConstructor;


//@Data
//public class GameDoc {
//    private Integer id;
//    private String gameName;
//    private String content;
//    private LocalDateTime createdAt;
//
//    // 转换方法
//    public static GameDoc fromGame(Game game) {
//        GameDoc doc = new GameDoc();
//        doc.setId(game.getId());
//        doc.setGameName(game.getGamename());
//        doc.setContent(game.getContent());
//        doc.setCreatedAt(LocalDateTime.parse(game.getCreatedAt()));
//        return doc;
//    }
//}
@Data
@NoArgsConstructor
public class GameDoc {
    private Integer id;


    private String gamename;

//    @Field(type = FieldType.Text, analyzer = "ik_max_word")
//    private String content;
  private String content;

    private String createdAt;

    // 转换方法
    public static GameDoc fromGame(Game game) {
        GameDoc doc = new GameDoc();
        doc.setId(game.getId());
        doc.setCreatedAt(game.getCreatedAt());
        return doc;
    }
}